--Transfer MU using an attribute
--Transfers the MU depending on an attribute of a successor.

/*The MU is transferred depending on an attribute of a successor.
If you replace "attribute" e.g. with "occupied" and "value" with "false" the actual MU ist transferred.
to the first free successor.

Details of implementation: ?.numSucc is assigned to the variable countSucc and not admitted to the loop-header
to prevent a time-consuming summary of the path ?.numSucc from being executed after every loop-cycle.

*/
is
	countSucc:integer;
	i:integer;
do
	countSucc := ?.numSucc;

	for i:=1 to countSucc loop
		if ?.succ(i).attribute = value then
			@.move(i);
			return;
		end;
	next;
end;
/*attribute:Enter the name of the attribute of the successor, which decides to wich successor the MU is transferred.
value:Enter the required value of the attribute, so that the MU is transferred to this successor.
*/